﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SchoolLibrary.DataBase.DAO.Helper;
using SchoolLibrary.Entity;

namespace SchoolLibrary.DataBase.DAO
{
    public abstract class AbstractDAO<T> where T : Identity
    {
        public const long UNDIFINED_ID = 0;

        private DAOHelper<T> daoHelper = new DAOHelper<T>();

        protected DAOHelper<T> getDAOHelper()
        {
            return daoHelper;
        }

        public abstract T findById(long id);

        public abstract List<T> findAll();

        public abstract void save(T entity);
    }
}
